package model

import "time"

type RechargeRecord struct {
	Id               int64     `gorm:"column:id;type:int UNSIGNED;primaryKey;not null;" json:"id"`
	PId              int64     `gorm:"column:p_id;type:int UNSIGNED;comment:用户;not null;" json:"p_id"`                                                 // 用户
	RechargeTime     time.Time `gorm:"column:recharge_time;type:datetime(3);comment:充值时间;not null;default:CURRENT_TIMESTAMP(3);" json:"recharge_time"` // 充值时间
	RechargeAmount   float64   `gorm:"column:recharge_amount;type:decimal(10, 2);comment:充值金额;default:NULL;" json:"recharge_amount"`                   // 充值金额
	RechargeChannels string    `gorm:"column:recharge_channels;type:varchar(10);comment:充值渠道;not null;default:微信;" json:"recharge_channels"`           // 充值渠道
}

func (r *RechargeRecord) TableName() string {
	return "recharge_record"
}
